<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProductInfoTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //对应book_info表id
        Schema::create('product_info', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('product_id')->comment('产品id');
            $table->integer('stage_id')->nullable()->comment('阶段id');
            $table->integer('grade_id')->nullable()->comment('年级id');
            $table->integer('course_id')->nullable()->comment('科目id');
            $table->integer('volumes_id')->nullable()->comment('书册id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('product_info');
    }
}
